home *** CD-ROM | disk | FTP | other *** search
/ HPAVC / HPAVC CD-ROM.iso / pc / INTER53E.ZIP / INTSUM16.ZIP / IDATA.CPP < prev    next >
Encoding:
C/C++ Source or Header  |  1996-10-13  |  3.9 KB  |  100 lines

  1. //********************************************************************
  2. //  IDATA.CPP - Global data for INTSUM application                    
  3. //                                                                    
  4. //  Copyright (c) 1996 Daniel D. Miller                               
  5. //                                                                    
  6. //  Last Update:  08-31-95 10:45pm                                    
  7. //                                                                    
  8. //  Compile with makefile                                             
  9. //                                                                    
  10. //********************************************************************
  11.  
  12. #include <stdio.h>   //  FILE*
  13. #include "intsum.hpp"
  14. // #include <memcheck.h>
  15.  
  16. //********************************************************************
  17. //  size of data buffers
  18. const long BFR_SIZE = 32000LU ;
  19.  
  20. //  size of reverse read must be smaller than size of normal
  21. //  read, so we are assured of finding current-line in our search.
  22. //lint -e528
  23. const long REV_SIZE = 10000LU ;
  24.  
  25. //lint -e528
  26. const int LOOP_FOREVER = 1 ;
  27.  
  28. //********************************************************************
  29. char rdtemp[UNDERSHOOT] ;
  30.  
  31. //********************************************************************
  32. //  used by one-line message functions and partial screen-clear
  33. //********************************************************************
  34. char spaces[121] = 
  35.    "                                        "
  36.    "                                        "
  37.    "                                        " ; //  120 spaces
  38.  
  39. //********************************************************************
  40. //lint -e528
  41. const unsigned last_ref_char = sizeof(sum_conv) - 1 ;
  42. //lint -e528
  43. const unsigned isl_lines = (unsigned) (BFR_SIZE / sizeof(int_sum_line)) ;
  44.  
  45. //*****************************************************************
  46. refs ref ;  //  reference-file data struct
  47.  
  48. //*****************************************************************
  49. //  list-file data struct
  50. //*****************************************************************
  51. lists list ;
  52.  
  53. //lint -e528
  54. const unsigned list_lines = (unsigned) (BFR_SIZE / sizeof(lines)) ;
  55.  
  56. FILE* lfile ;  //  make this global so scrolling fcns can get to it.
  57.  
  58. //*****************************************************************
  59. searchs search ;  //  string-search data struct
  60.  
  61. //*****************************************************************
  62. //  raw-data read buffer
  63. //*****************************************************************
  64. char* readptr ;
  65.  
  66. //*****************************************************************
  67. //  misc data strings
  68. //*****************************************************************
  69. char tempstr[128] ;  //  scratchpad string
  70. char oldstr[128] ;   //  used by reverse_search routines
  71. char inipath[64] ;
  72. char inidrive[4] ;
  73. char ilpath[64] ;
  74. char ildrive[4] ;
  75.  
  76. //*****************************************************************
  77. //  display structs
  78. //*****************************************************************
  79. const unsigned DATA_TOP = 4 ;
  80. vidptr ivideo = { DATA_TOP } ;
  81.       
  82. unsigned window_rows ;  //  data lines, not counting header
  83.  
  84. FILE* index ;
  85. //*****************************************************************
  86. //  screen text
  87. //*****************************************************************
  88. char* logo = Version ;
  89. char* dividers =
  90.    "────────────────────────────────────────────────────────────────────────────────" ;
  91. char* header =
  92.    "INT AH AL                     Description                     Press F1 for help " ;
  93. char* dividerd =
  94.    "═══╦══╦══╦══════════════════════════════════════════════════════════════════════" ;
  95. char* list_header =
  96.    "                              Description                     Press F1 for help " ;
  97. char* list_dividerd =
  98.    "════════════════════════════════════════════════════════════════════════════════" ;
  99.  
  100.